System and method to calibrate an uncollimated laser diode for 3D imaging applications

ABSTRACT

A system and method to calibrate an uncollimated laser diode for three-dimensional imaging applications. A method includes providing an optical comparator having an uncollimated laser diode as a light source to generate a shadow with sharp boundaries when used to illuminate an opaque occluder, wherein a two lines source model of light propagation is used to describe a behavior of the uncollimated laser diode, the two lines source model defined by two three-dimensional (3D) lines as model parameters, the uncollimated laser diode calibrated by estimating the two lines as a function of a sample of a ray field emitted by the uncollimated laser diode.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority from earlier filed U.S. ProvisionalPatent Application Ser. No. 62/568,668, filed Oct. 5, 2017, which isincorporated by reference in its entirety.

BACKGROUND OF THE INVENTION

The invention generally relates to three-dimensional (3D) imaging, andmore specifically to a system and method to calibrate an uncollimatedlaser diode for 3D imaging applications.

In general, an optical comparator is a device that applies theprinciples of optics to the inspection of manufactured parts. In anoptical comparator, the magnified silhouette of a part is projected upona screen, and the dimensions and geometry of the part are measuredagainst prescribed limits. Smith-2002 (K. Smith. Shedding Light onOptical Comparators. Quality Digest, May 2002) teaches that the opticalcomparator was invented by James Hartness in 1922, in particular toaddress the problem of inspecting screw threads. Optical comparatorshave been used in machine shops since then, and have not changed verymuch in design over the years. To obtain accurate measurements with thisinstrument the object or feature being observed must be compared to astandard of known size. The first application of this principle wascalled a shadowgraph. This instrument used a lamp to project atwo-dimensional (2D) image of the object being observed on a flatsurface. The shadow could then be measured with a known standard, suchas a ruler, to determine its size. This type of comparison allowed aninspector to determine if a part was in or out of tolerance. Modernoptical comparators comprise imaging sensors so that the comparisons aremade using image processing software. Accurate measurements requireshadows with sharp boundaries, as well as mathematical models of lightpropagation and shadow formation to relate the shadow boundaries to the3D dimensions of the inspected part. A typical optical comparator isdescribed, for example, in U.S. Pat. No. 8,400,633B2 (E. Polidor. Methodof Inspecting Test Parts with an Optical Comparator Having Digital Gage.U.S. Pat. No. 8,400,633 B2, March 2013).

The mathematical models underlying 3D imaging algorithms based on activeillumination, such as shape-from-silhouette 3D reconstruction, andstructured light 3D scanning using binary patterns, are also based onthe assumption that the light sources are capable of generating shadowswith sharp boundaries when they are used to illuminate opaque occluders.Many shape-from-silhouette 3D reconstruction methods and systems havebeen disclosed in the prior-art, for example by Baumgart-1974 (B.Baumgart. Geometric Modeling for Computer Vision. PhD thesis, StanfordUniversity, 1974), Ahuja-etal-1989 (N. Ahuj a and J. Veenstra.Generating Octrees from Object Silhouettes in Orthographic Views. IEEETransactions on Pattern Analysis and Machine Intelligence,11(2):137-149, February 1989), Laurentini-1991 (A. Laurentini. TheVisual Hull: A New Tool for Contour-Based Image Understanding. InProceedings of the 7th Scandinavian Conference on Image Analysis.Pattern Recognition Society of Denmark, 1991), Szeliski-1993 (R.Szeliski. Rapid Octree Construction from Image Se-quences. CVGIP: ImageUnderstanding, 58(1):23-32, July 1993), and Laurentini-1994 (A.Laurentini. The Visual Hull Concept for Silhouette-Based ImageUnderstanding. IEEE Transactions on Pattern Analysis and MachineIntelligence, 16(2):150-162, February 1994). The prior-art on structuredlight 3D scanning with binary patterns is reviewed by Salvi-etal-2004(J. Salvi, J. Pags, and J. Batlle. Pattern Codification Strategies inStructured Light Systems. Pattern Recognition, 37(4):827-849, April2004).

Light Sources

In structure-from-silhouette 3D reconstruction, using a small extendedlight source such as a high intensity LED results in blurred shadowboundaries. FIG. 1 is an illustration which shows a first shadow 100produced using an uncollimated laser diode as a light source, and asecond shadow 110 produced using an LED as a light source. In both casesthe same small object is illuminated by the two light sources undersimilar conditions, such as distance from light source to object, andfrom object to screen. In structured light 3D scanning, using a lens tofocus a binary pattern on an object is intrinsically flawed due to depthof field constraints, because out of focus binary patterns look likeshadow with blurred boundaries as well. Diffraction optical elements,such as those commercialized by Holoeye (Holoeye diffractive opticalelements. http://holoeye.com/diffractive-optics), which do not requirefocusing with lenses, are used in certain single-shot 3D scanningdevices, such as the Microsoft Kinect V1 (Microsoft. Kinect for Xbox360. http://en.wikipedia.org/wiki/Kinect, November 2010). Unfortunately,the diffraction optical element technology is not appropriate to develophigh resolution 3D scanners.

The point light source is a theoretical light source used to understandbasic concepts in optics. FIG. 2 is prior-art which illustrates thedifference between a point light source 210, and an extended lightsource 220, when both illuminate similar occluders 230,240 with sharpedges, and casting shadows on screens 250,265. For the point lightsource 210, every screen point is either fully illuminated 270 ortotally in shadow 260 because the screen point is illuminated by at mostone ray of light from the point light source. The silhouette 265corresponding to the sharp boundary corresponds to a step discontinuityin illumination. For the extended light source 220, every screen pointcan be in complete shadow 280, totally illuminated 290, or partiallyilluminated by part of the extended light source. The illumination onthe screen 265 varies continuously from the shadow region 280 to thefully illuminated region 290 defining a penumbra region 295, whichappears to the eye as a blurry silhouette.

A point light source without focusing lenses illuminating the occluderwould solve the problems in the two applications mentioned above, butunfortunately the point light source is a theoretical concept which doesnot exist in the physical world. In most real applications, the lightsources are extended, and the dimensions of the light-emitting surfaceare not insignificant with respect to the dimensions of the overallimaging apparatus, and in particular with respect to the dimensions ofthe object being imaged, resulting in shadows with blurred boundaries.Furthermore, modeling the image formation process using extended lightsources results in complex equations, which are usually impossible tosolve in practice.

The Uncollimated Laser Diode

FIG. 3 shows that a low cost uncollimated laser diode 310 producesshadow 330 with sharp boundaries when it is used to illuminate an opaqueoccluder 320 without any additional optical components, and the sharpboundaries in the shadows 331, 332, 333, 334 are maintained within awide range of objects 321, 322, 323, 324 of various complexities, depth,and feature size.

Most light beams generated by semiconductor lasers are characterized byellipticity, astigmatism, and large divergence. These properties areundesirable for light beam generation and are usually opticallycorrected. Due to diffraction, the beam diverges (expands) rapidly afterleaving the chip, typically at 30 degrees vertically by 10 degreeslaterally. Also, as a consequence of the rectangular shaped active layerand the non-uniform gain profile within the active layer, laser diodebeams are astigmatic. Astigmatism is a well-known and documentedproperty of laser diodes, as described by Sun-1997 (H. Sun. Measurementof Laser Diode Astigmatism. Optical Engineering, 36(4):1082-1087, April1997), and even standards such as ISO-11146-1:2005 (ISO 11146-1:2005,lasers and laser-related equipment—test methods for laser beam widths,divergence angles and beam propagation ratios—part 1: Stigmatic andsimple astigmatic beams. International Organization for Standardization,January 2005), exist to measure it. An astigmatic laser beam does notemerge from a single 3D point, but appears to be emerging from multiplelocations. As a result of astigmatism the Partial Least Squares (PLS)model turns out not to be an accurate geometric model of lightpropagation for the Unit Load Device (ULD). Since astigmatism can varyfrom one laser diode to another even of the same type, calibrationprocedures are required to guarantee precise measurements.

The property illustrated in FIG. 3 has neither been documented in theoptics literature nor in the computer vision literature. This discoverysuggests that uncollimated laser diodes could be used as light sourcesin the target 3D imaging and metrology applications mentioned above,namely shape from silhouettes and structured light 3D scanning withbinary patterns, potentially resulting in low cost precise industrialinspection, metrology, and 3D imaging systems.

However, since the point light source is not a good mathematical modelto describe how light emitted by an uncollimated laser diode propagates,a new mathematical model of light propagation is needed to describe thebehavior of the uncollimated laser diode, along with a method toestimate the parameters of such mathematical model from measurements.

Since an uncollimated laser diode produces shadows with sharpsilhouettes and without penumbra, it is reasonable to require the newmodel of light propagation to have the following property: for each 3Dpoint illuminated by the uncollimated laser diode, there should exist aunique ray emitted by the uncollimated laser diode which hits the 3Dpoint. The point light source satisfies this property, because thedirection of such unique ray is trivially defined by the vector goingfrom the point light source to the 3D point. A new efficient method toanalytically determine the mathematical description of the unique ray asa function of the model parameters is also needed to enable efficientimplementations of the technology in the target 3D imaging applications.

SUMMARY OF THE INVENTION

The following presents a simplified summary of the innovation in orderto provide a basic understanding of some aspects of the invention. Thissummary is not an extensive overview of the invention. It is intended toneither identify key or critical elements of the invention nor delineatethe scope of the invention. Its sole purpose is to present some conceptsof the invention in a simplified form as a prelude to the more detaileddescription that is presented later.

In an aspect, the invention features a method including providing anoptical comparator having an uncollimated laser diode as a light sourceto generate a shadow with sharp boundaries when used to illuminate anopaque occluder, wherein a two lines source model of light propagationis used to describe a behavior of the uncollimated laser diode, the twolines source model defined by two three-dimensional (3D) lines as modelparameters, the uncollimated laser diode calibrated by estimating thetwo lines as a function of a sample of a ray field emitted by theuncollimated laser diode.

In another aspect, the invention features a system including auncollimated laser diode that emits a field of rays, a camera, a screen,and a mask, the mask configured as an occluder with a pattern of holesthat enable light emitted by the uncollimated laser diode through,creating a pattern of bright spots on the screen.

Embodiments of the invention may have one or more of the followingadvantages.

The Two Lines Light Source model of light propagation is disclosed toaccurately describe the behavior of uncollimated laser diodes. Thetwo-lines light source model has a simple and elegant formulationdefined by two 3D lines, rather than the single 3D point, which definesthe point light source model, but it reduces to the point light sourcemodel when the two lines intersect. As a result, the two-lines lightsource model is a natural generalization of the point light sourcemodel.

As in the point light source model, for each illuminated 3D point thereexists a unique ray emitted by the light source passing through thepoint, which can be described in closed form, and can be estimated inconstant time at low computational cost. A method to evaluate saidunique ray is disclosed.

A calibration method is disclosed to estimate the two lines light sourcemodel parameters. The mapping from illuminated points to emitted rays isreferred to as the ray field emitted by the light source. Thecalibration method requires a sample of the ray field emitted by theuncollimated laser diode.

A system to sample the ray field emitted by the light source isdisclosed.

These and other features and advantages will be apparent from a readingof the following detailed description and a review of the associateddrawings. It is to be understood that both the foregoing generaldescription and the following detailed description are explanatory onlyand are not restrictive of aspects as claimed

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features, aspects, and advantages of the presentinvention will become better understood with reference to the followingdescription, appended claims, and accompanying drawings where:

FIG. 1 is an illustration comparing the shadows produced using anuncollimated laser diode as a light source, and similar shadows producedusing an LED as a light source.

FIG. 2 is prior-art which illustrates the difference between a pointlight source, and an extended light source, when both illuminate similaroccluders with sharp edges, and casting shadows on screens.

FIG. 3 is an illustration which shows that a low cost uncollimated laserdiode produces shadow with sharp boundaries when it is used toilluminate an opaque occluder without any additional optical components,and the sharp boundaries in the shadows are maintained within a widerange of objects of various complexities, depth, and feature size.

FIG. 4 is an illustration which describes the two lines point lightsource model.

FIG. 5 is a line drawing which illustrates the geometric relationshipsexisting between geometric elements in the two lines light source model.

FIG. 6 is a flow chart describing a method to estimate the unique raypredicted by the two lines light source model passing through anilluminated point.

FIG. 7 is a flow chart describing a method to calibrate a light sourceusing the two lines light source model.

FIG. 8 is a flow chart describing the step of initializing in the methodto calibrate a light source using the two lines light source model ofFIG. 7.

FIG. 9 shows a system designed to sample the field of rays emitted by adirectional extended light source.

FIG. 10 shows a preferred embodiment of the system designed to samplethe field of rays emitted by a directional extended light source usingtwo cameras.

FIG. 11 is a line drawing which shows a visualization of the rayssampled by the systems described in FIGS. 9 and 10.

DETAILED DESCRIPTION OF THE INVENTION

The subject innovation is now described with reference to the drawings,wherein like reference numerals are used to refer to like elementsthroughout. In the following description, for purposes of explanation,numerous specific details are set forth in order to provide a thoroughunderstanding of the present invention. It may be evident, however, thatthe present invention may be practiced without these specific details.In other instances, well-known structures and devices are shown in blockdiagram form in order to facilitate describing the present invention.

Several 3D imaging methods based on active illumination, such assilhouette-based 3D reconstruction and structured light 3D scanning withbinary patterns, require light sources capable of generating shadowswith sharp boundaries when they are used to illuminate opaque occluders.The invention develops the technological foundations to use anUncollimated Laser Diode as the light source in the target applications.Since due to astigmatism the Point Light Source is not an accuratemathematical model of light propagation for the uncollimated laserdiode, the Two Lines Light Source model of light propagation isdisclosed to accurately describe the behavior of the uncollimated laserdiode. The disclosed model is defined by two 3D lines as modelparameters, rather than the single 3D point which defines the pointlight source. A calibration method is disclosed which estimates said twolines as a function of a sample of the ray field emitted by theuncollimated laser diode. A system to sample the ray field emitted by adirectional extended light source is disclosed. The two lines lightsource model guarantees that for each illuminated 3D point there existsa unique emitted ray, which simultaneously passes through the point andintersects the two lines. Furthermore, said emitted ray can be computedin closed form at very low computational cost. Finally, a method toefficiently estimate the equation of said ray is also disclosed.

Modeling Extended Light Sources

To simplify the analysis, we will model the light emitting surface ofthe laser diode as a small rectangle contained in the plane {z=0}aligned with the x and y Cartesian axes, centered at the origin, andwith the light emitted only in the direction of z>0. A function I(x,y,v)which attains non-negative values measuring the directional lightintensity emitted in the direction of the unit length vector v so thatv_(z)>0 from the point (x,y) within the light emitter rectangle can beused as a general mathematical model to describe the rectangle as anextended light source where each point on the light emitter surface hasa different directional distribution. In fact this representation,described by Koshel-etal-2013 (J. Koshel, I. Ashdown, W. Brandenburg, D.Chabaud, O. Dross, S. Gangadhara, K. Garcia, M. Gauvin, G. Gre-gory, D.Hansen, K. Haraguchi, G. Hansa, J. Jiao, R. Kelley, and J. Muschaweck.Data Format for Ray File Standard. In Proceedings of Renewable Energyand the Environment, Freeform Optics, Tucson, Ariz., United States,November 2013), corresponds to a file format which has been standardizedto contain the information represented by the function I(x,y,v), as wellas additional information. The so-called Ray Files are predefined raytables consisting of xyz starting points and direction vectors, as wellas polarization states, wavelength data, and the initial flux value orStokes Vector for each ray. Ray files are typically created frommeasured results or theoretical calculation and are used in illuminationdesign software.

Directional Extended Light Sources

The model I(x,y,v) introduced in the previous section can be regarded asa Light Field with the light traversing the rays in the oppositedirection, and it is too general to describe the behavior of theuncollimated laser diode. The Light Field was introduced byLevoy-Hanrahan-1996 (M. Levoy and P. Hanrahan. Light Field Rendering. InProceedings of the 23rd Annual Conference on Computer Graphics andInteractive Techniques (Siggraph'96), pages 31-42, 1996) as animage-based rendering representation. To explain the sharp shadowboundaries, it is necessary that for each point (x,y) in the lightemitting surface the function I(x,y,v) be close to zero except for asmall region concentrated around a particular unit length directionvector u(x,y) which could change from point to point. In the limit casethe function I(x,y,v) would be a generalized function

$\begin{matrix}{{I\left( {x,y,z} \right)} = \left\{ \begin{matrix}{I\left( {x,y} \right)} & {{{if}\mspace{14mu} v} = {u\left( {x,y} \right)}} \\0 & {{{if}\mspace{14mu} v} \neq {u\left( {x,y} \right)}}\end{matrix} \right.} & (1)\end{matrix}$where I(x,y) is a non-negative scalar function of two variables. Notethat the ideal point light source satisfies this model, where u(x,y) isthe vector going from the point (x, y, 0) to the point source,normalized to unit length. We will refer to this model as theDirectional Extended Light Source model, to the function I(x,y) as theIntensity Light Field, and to the vector function u(x,y) as the VectorLight Field of the model.The Two Lines Light Source

The Two Lines Light Source model is disclosed. It is a particularparameterized type of directional extended light source defined by twostraight lines L₁ and L₂, which can be described in parametric form asL ₁ ={q=q ₁ +t ₁ w ₁} and L ₂ ={a=q ₂ t ₂ w ₂}where q₁ and q₂ are 3D points, w₁ and w₂ are two linearly independentunit length vectors, and t₁ and t₂ are scalar parameters.

In the case of the uncollimated laser diode, the light-emitting surfacecan be regarded as a rectangular aperture so that only rays that crossthe aperture are light carrying. If the axes of the rectangular apertureare parallel to the vectors w₁ and w₂, then the aperture determinesnatural bounds on t₁ and t₂, but we do not introduce those parameters inthe model. Note that there is neither guarantee that the two lines areperpendicular to each other, nor that they are aligned with theCartesian axes.

FIG. 4 is an illustration, which describes the two lines light sourcemodel comprising a first straight line L₁ 410, and a second straightline L₂ 420. Each ray 450 emitted by the model is defined by one pointp₁ 430 on line L₁ 410, and one point p₂ 440 on line L₂ 420. Everydirected extended light source, and in particular those which can bemodeled with the two lines light source, has an aperture 460, so thatonly rays which pass through the aperture are light emitting rays.However, the aperture is not included in the two lines light sourcemodel.

Unique Emitted Ray Through Each Illuminated 3D Point

Let us consider the two parallel planes spanned by the vectors w₁ andw₂; the first one containing the line L₁, and the second one containingthe line L₂. The main property of the two lines light source model isthat for each 3D point p which does not belong to either one of thesetwo planes, there exist a unique line L(p) which intersects both lines.

To determine the equation of the straight line L(p), we observe thatsince the point p does not belong to the line L₁, there exists a uniqueplane π₁=

p, L₁

spanned by the line L₁ and the point p. Similarly, since the point pdoes not belong to the line L₂, there exists a unique plane π₂=

p, L₂

spanned by the line L₂ and the point p. These two planes π₁ and π₂intersect, because both of them contain the point p, but are differentfrom each other because the lines L₁ and L₂ are not parallel. It followsthat the intersection of the two planes π₁ and π₂ is a straight line L.Since the line L₁ is neither contained nor parallel to the plane π₂, theintersection of the line L₁ with the plane π₂ is a single point p₁. By asimilar reasoning, the intersection of the line L₂ with the plane π₁ isa single point p₂. The points p₁ and p₂ also belong to the line Lbecause{p ₁}=π₂ ∩L ₁⊆π₂∩π₁ =L and {p ₂}=π₁ ∩L ₂⊆π₁∩π₂ =L.As a result, the straight line L determined by this geometric reasoningis the unique straight line L(p) mentioned above.

Let us now consider the problem of determining the equation of thestraight line L(p), which is equivalent to determining the coordinatesof the intersection points p₁ and p₂. The plane π₁ can be described inimplicit form asπ₁ ={q:n ₁ ^(t)(q−q ₁)=0}where n₁=w₁×(p−q₁) is a vector normal to the plane π₁. Similarly theplane π₂ can be described in implicit form asπ₂ ={q:n ₂ ^(t)(q−q ₂)=0}where n₂=w₂×(p−q₂) is a vector normal to the plane π₂. Since the pointp₁ belongs to the line L₁, there exists a unique value of the parametert₁ so thatp ₁ =q ₁ +t ₁ w ₁Since the point p₁ also belongs to the plane π₂, the parameter t₁ mustsatisfy the following equation

$0 = {{n_{2}^{t}\left( {p_{1} - q_{2}} \right)} = {\left. {n_{2}^{t}\left( {\left( {q_{1} - q_{2}} \right) + {t_{1}w_{1}}} \right)}\Rightarrow t_{1} \right. = {\frac{n_{2}^{t}\left( {q_{2} - q_{1}} \right)}{n_{2}^{t}w_{1}}.}}}$Similarly, the point p₂ can be written as followsp ₂ =q ₂ +t ₂ w ₂where the parameter t₂ has the value

$t_{2} = {\frac{n_{1}^{t}\left( {q_{1} - q_{2}} \right)}{n_{1}^{t}w_{2}}.}$

FIG. 5 is a line drawing which illustrates the geometric relationshipsbetween the line L₁ 510, the line L₂ 520, the points p 530, p₁ 550, andp₂ 540, and the line L(p) 560.

FIG. 6 is a flow chart describing a method 600 to estimate the uniqueray L(p) predicted by the two lines light source model passing throughan illuminated point. In step 610 the two lines L₁={q=q₁+t₁w₁} andL₂={q=q₂+t₂w₂} are obtained. In step 620 the point p is obtained. Instep 630 the first plane π₁ normal vector n₁=w₁×(p−q₁) is computed. Instep 640 the second plane π₂ normal vector n₂=w₂×(p−q₂) is computed. Instep 650 the parameter t₁ which determines the location of the point p₁along line L₁ is computed. In step 660 the parameter t₂ which determinesthe location of the point p₂ along line L₂ is computed. In step 670 thecoordinates of the point p₁ are determined. In step 680 the coordinatesof the point p₂ are determined.

Calibration

A calibration method for the two lines light source model is disclosed,which takes as input a finite sample {R₁, . . . , R_(N)} of the lightsource ray field, and produces estimates of the two lines L₁ and L₂which define the two lines light source model. Furthermore, each rayR_(k) in the finite sample of the light source ray field is a straightline specified by a pair three-dimensional points (p_(k) ^(M),p_(k)^(S)) and all the second points in these pairs {p₁ ^(S), . . . , p_(N)^(S)} belong to a screen plane π_(S). In a preferred embodiment all thefirst points of the pairs {p₁ ^(M), . . . , p_(N) ^(M)} belong to a maskplane π_(M)

Given two arbitrary lines lines L₁ and L₂, the two lines light sourcemodel is used to determine the equation of the unique line L(p_(k) ^(M))supporting the unique ray emitted by the light source which passesthrough the point p_(k) ^(M) as predicted by the model. The intersectionof the line L(p_(k) ^(M)) and the plane π_(S) is a point q_(k) ^(S),which in practice is likely to be different from the point p_(k) ^(S)due to measurement errors. The calibration process is formulated as theglobal minimization of the following bundle adjustment objectivefunction, which measures the sum of the squares of the projection errorson the screen plane.E(L ₁ ,L ₂)=Σ_(k=1) ^(N) ∥q _(k) ^(S) −p _(k) ^(S)∥²  (2)

Since this is a non-linear multimodal objective function, an approximatesolution is first determined by solving an initialization problem, forwhich an analytic solution exists, and then refine the approximatesolution by locally minimizing the non-linear bundle adjustmentobjective function using prior-art numerical methods such as theLevenberg-Marquardt algorithm.

FIG. 7 is a flow chart describing a method 700 to calibrate a lightsource using the two lines light source model. In step 710 the pointpairs (p₁ ^(M),p₁ ^(S)), . . . , (p_(N) ^(M), p_(N) ^(S)) which definethe rays R₁, . . . , R_(N) are obtained. In step 720 an approximatesolution to the global optimization problem of minimizing the objectivefunction of Equation 2 is determined. In step 730 the approximatesolution is refined using a prior-art numerical descent method.

Initial Approximate Calibration Using Plucker Coordinates

A straight line in 3D can be represented by a 2×4 matrix defined by apair of points (p,q) which belong to the line

$\begin{matrix}\begin{bmatrix}p_{x} & p_{y} & p_{z} & 1 \\q_{x} & q_{y} & q_{z} & 1\end{bmatrix} & (3)\end{matrix}$This representation is, of course, not unique. The Plucker coordinatesof this line can be defined as the 6-dimensional vector X whosecoordinates are

$\begin{matrix}\left\{ \begin{matrix}{X_{12} = {{p_{x}q_{y}} - {q_{x}p_{y}}}} \\{X_{13} = {{p_{x}q_{z}} - {q_{x}p_{z}}}} \\{X_{14} = {p_{x} - q_{x}}} \\{X_{23} = {{p_{y}q_{z}} - {q_{y}p_{z}}}} \\{X_{24} = {p_{z} - q_{z}}} \\{X_{34} = {q_{y} - p_{y}}}\end{matrix} \right. & (4)\end{matrix}$

It is known in the prior-art that given two 2×4 matrix representationsof the same straight line, given by two different pairs of points, theircorresponding Plucker coordinates are the same except for amultiplicative constant. Conversely, if two pairs of three-dimensionalpoints have the same Plucker coordinates except for a multiplicativeconstant, then the two pairs of points belong to a common straight line.That is, the mapping which computes the Plucker coordinates as afunction of the two points produces a point in the projective space

⁵ of dimension five. Not every point in

⁵ is the Plucker coordinate of a straight line in 3D though. Actuallythe image of the Plucker map forms a quadric Q in

⁵ defined by the zeros of the polynomialf(X)=X ₁₂ X ₃₄ −X ₁₃ X ₂₄ +X ₁₄ X ₂₃  (5)

A classical mathematical result described by Kleiman-Laksov-1972 (S. L.Kleiman and D. Laksov. Schubert calculus. The American MathematicalMonthly, 79(10):1061-1082, 1972), states that given four straight linesin general position in 3D there exist exactly two other straight linesthat intersect the given four. A simple algorithm to determine these twolines, along with the mathematical foundations of the method, wereproposed for example by Lanman-etal-2006 (D. Lanman, M. Wachs, G.Taubin, and F. Cukierman. Reconstructing a 3D line from a singlecatadioptric image. In Third International Symposium on 3D DataProcessing, Visualization, and Transmission, pages 89-96, IEEE, 2006).It comprises the following steps: 1) constructing a 6×4 matrix byconcatenating the Plucker coordinates vectors of the four given lines ascolumns; 2) determining a basis of the two dimensional subspaceorthogonal to the four dimensional subspace spanned by the four vectorsof Plucker coordinates (numerically, this can be achieved by computingthe singular value decomposition of the 6×4 matrix, and determining thetwo singular vectors corresponding to the two zero singular values); 3)this two dimensional subspace is actually a straight line in

⁵ which intersects the quadric Q in two points; determine the twointersection points; 4) these two points in

⁵ are guaranteed to be the Plucker coordinates of two different straightlines in 3D; determine those two lines.

Given N>4 straight lines, such as the finite sample {R₁, . . . , R_(N)}of the light source ray field used as input to the calibration method,the previous SVD-based algorithm can be generalized, replacing the 6×4matrix by the 6×N matrix resulting from concatenating the Pluckercoordinates of the N straight lines, and determining the two dimensionalsubspace spanned by the two left singular vectors associated with thetwo smallest singular values. This process is used to compute anapproximate initial solution in the calibration method.

FIG. 8 is a flow chart describing the step 720 of determining anapproximate solution to the global optimization problem of minimizingthe objective function of Equation 2. In step 810 the point pairs (p₁^(M),p₁ ^(S)), . . . , (p_(N) ^(M), p_(N) ^(S)) which define the raysR₁, . . . , R_(N) are obtained. In step 820 the 6D Plucker coordinatevectorsX ₁ =X(p ₁ ^(M) ,p ₁ ^(S)), . . . ,X _(N) =X(p _(N) ^(M) ,p _(N) ^(S))are computed for all the point pairs using Equation 4. In step 830 thetwo singular vectors of the 6×N matrix [X₁ . . . X_(N)], constructed byconcatenating the Plucker vectors as columns, corresponding to the twosmallest singular values, are determined. In step 840 the two roots τ₁and τ₂ of the quadratic equationf(U ₁ +τU ₂)=0where f(X) is the polynomial of Equation 5. In step 850 the coordinatesof the two model lines L₁=U₁+τ₁ U₂ and L₂=U₁+τ₂ U₂ are computed inPlucker coordinates. Finally in step 860 the Plucker coordinates areinverted to obtain the representation of the two lines in parametricform L₁={q=q₁+t₁w₁} and L₂={q=q₂+t₂w₂}.Alternative Refinement Scheme

In the previous section a method to determine initial estimates for thetwo lines minimizing the objective function of equation 2 was disclosed.It can be observed in practice that these initial estimates are oftennot sufficiently good, and a descent procedure is required to refinethese estimates. In a preferred embodiment the calibration methodrefines the initial estimate using the following approach as analternative to minimizing the objective function of Equation 2.

As a reminder, the input data to both the initialization procedure andthe refinement procedure are the points {p₁ ^(M), . . . , p₁ ^(M)}, andthe points {p₁ ^(S), . . . , p₁ ^(S)}. The pairs (p_(k) ^(M),p_(k) ^(S))define the ray samples obtained from measurements. In this embodimentthe points {p₁ ^(S), . . . , p₁ ^(S)} are not required to be coplanar.

To simplify the notation in this section, let's replace p_(k) ^(M) byp_(k), and let v_(k) be the result of normalizing the vector p_(k)^(M)−p_(k) ^(S) to unit length. Each pair (p_(k),v_(k)) defines theparametric equation of a line supporting a measured ray. Since the twostraight lines L₁ and L₂ that define the TLLS model should intersect theN measured lines, the approach in this embodiment is to look at thefunction which measures the sum of the square distances from anarbitrary line to the N measured lines, and search the domain of thisfunction for the two different local minima predicted byKleiman-Laksov-1972.

It is known in the prior-art that the following equation describes thesquare of the distance between an arbitrary straight line={p+t v} andthe straight line L_(k)={p=p_(k)+t_(k) v_(k)}

$\begin{matrix}{{{dist}\left( {L,L_{k}} \right)}^{2} = \left( \frac{\left( {v \times v_{k}} \right)^{t}\left( {p - p_{k}} \right)}{{v \times v_{k}}} \right)^{2}} & (6)\end{matrix}$It follows that the following expression describes the average squaredistance from the line L to the N given lines

$\begin{matrix}{{E(L)} = {\frac{1}{N}{\sum\limits_{k = 1}^{N}\left( \frac{\left( {v \times v_{k}} \right)^{t}\left( {p - p_{k}} \right)}{{v \times v_{k}}} \right)^{2}}}} & (7)\end{matrix}$This new objective function can also be written as follows

$\begin{matrix}{{E(L)} = {\frac{1}{N}{\sum\limits_{k = 1}^{N}\left( {w_{k}^{t}\left( {p - p_{k}} \right)} \right)^{2}}}} & (8)\end{matrix}$where w_(k)=(v×v_(k))/∥v×v_(k)∥. Note that for fixed values of v, v₁, .. . , v_(N), p₁, . . . , p_(N) the objective function E(L) is aquadratic non-negative function of p. As a result the optimal value of pcan be computed in closed form as

$\begin{matrix}{p = {\left( {\frac{1}{N}{\sum\limits_{k = 1}^{N}\left( {w_{k}w_{k}^{t}} \right)}} \right)^{- 1}\left( {\frac{1}{N}{\sum\limits_{k = 1}^{N}\left( {w_{k}^{t}p_{k}} \right)}} \right)}} & (9)\end{matrix}$

As a result, the objective function of Equation 8 can be regarded asfunction of only the vector v, which is a unit length vector. One ofmany prior-art methods to parameterize the unit sphere can be used toconvert the resulting constrained non-linear least squares optimizationproblem into an unconstrained non-linear least squares problem definedon a two dimensional domain. One of many prior-art numerical methodsexist to locally minimize unconstrained non-linear least squaresproblems.

Sampling the Ray Field Emitted by a Directional Extended Light Source

FIG. 9 shows a system 900 to sample the field of rays emitted by adirectional extended light source 910. In addition to the directionalextended light source 910, the system comprises a camera 920, a screen930, and a mask 940. In a preferred embodiment, the system alsocomprises a turntable 950 used to rotate the mask 940 with respect tothe other system elements, which remain static with respect to eachother. The mask 940 is an occlude with a pattern of holes 945 which letthe light emitted by the light source 910 through creating a pattern ofbright spots 935 on the screen 930. In a preferred embodiment the holes945 are rectangles with identifiable hole corners 947, and thecorresponding bright spots 935 are quadrilaterals with identifiablebright spot corners 937, which can be put in correspondence. In apreferred embodiment the mask 940 is a thin chemically etched metal maskcomprising an array of 3×4 square holes 945, resulting in 48-holecorners 947 corresponding to 48 bright spot corners 937.

The intrinsic parameters of the camera 920 are calibrated usingprior-art camera calibration method. The camera coordinate system 960 isused as the global coordinate system to describe the coordinates of allthe straight lines and points. The camera 920 is positioned so that boththe mask 940 and the screen 930 are contained in the camera field ofview. The hole corners 947 of the mask are detected in the imagecaptured by the camera 920 using a modified checkerboard detectionalgorithm. The boundary edges of the holes 945 are detected andsegmented into collinear groups. A straight line is fit to eachcollinear group. The pixel locations corresponding to the hole corners947 are estimated as the intersections of vertical and horizontal lines.Since the dimensions of the mask 940 are known, the pose of the mask 940in the global coordinate system 960 is determined as a function of thepixel coordinates of the labeled square corners using a prior-artcheckerboard pose estimation algorithm.

The screen 930 is fabricated with a few fiducials 931, 932, 933, 934,which are used to determine the pose of the screen plane and itsimplicit equation using a prior-art pose estimation algorithm. Withminimal modifications, the same algorithm used to detect the holecorners 947 of the mask in the image is used to detect the bright spotcorners 937 of the screen also in the image. The pixel coordinates ofeach of these corresponding pairs of corners (947,937) define a ray,which passes through the corresponding screen point and the center ofprojection of the camera. The intersection if this ray, represented inparametric form, with the screen plane, represented in implicit form,yields the 3D coordinates of the corresponding bright spot corner 937 inthe screen. For each of the 48 square corners of the mask we now haveits 3D coordinates, as well as the 3D coordinates of a correspondingscreen point. These two points belong to the same ray emitted by thelaser, and are used to determine the equation of the straight linesupporting the ray.

Because of the different distances from the mask 940 and screen 930 tothe camera 920 and the different sizes, in practice it is difficult tofocus the camera so that the mask 940 and the screen 930 are both infocus simultaneously. Since refocusing the camera requires geometricrecalibration of the camera, in this case the system would not be ableto perform its function with accuracy.

FIG. 10 shows a preferred embodiment 1000 of the system 900 designed tosample the field of rays emitted by a directional extended light sourceusing two cameras. The system 1000 comprises all the elements of thesystem 900, plus a second camera 921. In this embodiment the field ofview of camera 920 contains only the image of the screen 930, and thefield of view of the second camera 921 contains the image of the mask940. Camera 920 is focused on the screen 930, and camera 921 is focusedon the mask 940. The two cameras are calibrated using a prior-art stereocalibration algorithm, which is used to transform coordinates from thesecond camera coordinate system 961 to the global coordinate system 960.

FIG. 11 is a line drawing which shows a visualization of the rayssampled by the systems described in FIGS. 9 and 10. It is quite clearthat these rays do not converge on a single 3D point. As a result,although the uncollimated laser diode emits rays which diverge and donot seem to intersect within the working volume, it is clear that itdoes not behave like a point light source. However, the two straightlines predicted by the two lines light source model are clearly visible.

It would be appreciated by those skilled in the art that various changesand modifications can be made to the illustrated embodiments withoutdeparting from the spirit of the present invention. All suchmodifications and changes are intended to be within the scope of thepresent invention except as limited by the scope of the appended claims.

What is claimed is:
 1. A method comprising: providing an opticalcomparator having an uncollimated laser diode as a light source togenerate a shadow with sharp boundaries when used to illuminate anopaque occluder, wherein a two lines source model of light propagationis used to describe a behavior of the uncollimated laser diode, the twolines source model defined by two three-dimensional (3D) lines as modelparameters, the two lines source model comprising a first straight line;and a second straight line, wherein each ray emitted by the model isdefined by one point on the first straight line and one point on thesecond straight line, the uncollimated laser diode calibrated byestimating the two lines as a function of a sample of a ray fieldemitted by the uncollimated laser diode.
 2. The method of claim 1wherein for each 3D point that does not belong to either one of twoplanes that include the first straight line and the second straightline, there exists a unique line which intersects both lines.
 3. Themethod of claim 2 wherein calibrating comprises: using the two lineslight source model to determine an equation of the unique line L(p_(k)^(M)) supporting a unique ray emitted by the light source which passesthrough a point p_(k) ^(M) as predicted by the model, the intersectionof the line L(p_(k) ^(M)) and the plane π_(S) being a point q_(k) ^(S)and formulating as a global minimization of a bundle adjustmentobjective function,E(L ₁ ,L ₂)=Σ_(k=1) ^(N) ∥q _(k) ^(S) −p _(k) ^(S)∥² which measures asum of the squares of projection errors on a screen plane, where p_(k)^(M) is a corner of a hole in the mask, p_(k) ^(S) is the projection ofthe p_(k) ^(M) corner detected on the screen, and k=1, . . . N, N is thenumber of corners in the mask.
 4. A system comprising: an uncollimatedlaser diode that emits a field of rays; a camera; a screen; and a mask,the mas configured as an occluder with a pattern of holes that enablelight emitted by the uncollimated laser diode through, creating apattern of bright spots on the screen, wherein each of the holes arerectangles with identifiable hole corners and the corresponding brightspots are quadrilaterals with identifiable bright spot corners, whichcan be put in correspondence.
 5. The system of claim 4 wherein the maskis a thin chemically etched metal mask comprising an array of 3×4 squareholes, resulting in 48-hole corners corresponding to 48 bright spotcorners.
 6. The system of claim 4 wherein the camera includes a cameracoordinate system to describe the coordinates of all the straight linesand points.
 7. The system of claim 6 wherein the camera is positioned sothat both the mask and the screen are contained in a camera field ofview.
 8. The system of claim 4 wherein the identifiable hole corners aredetected in an image captured by the camera using a modifiedcheckerboard detection algorithm, wherein boundary edges of the holesare detected and segmented into collinear groups, a straight fitted toeach collinear group, pixel locations corresponding to the hole cornersestimated as intersections of vertical and horizontal lines.
 9. Thesystem of claim 4 wherein the screen is fabricated with fiducials usedto determine a pose of a screen plane and its implicit equation using apose estimation algorithm, the pose estimation algorithm used to detectthe hole corners of the mask in the image and the bright spot corners ofthe screen also in the image, pixel coordinates of each of thesecorresponding pairs of corners defining a ray, which passes through acorresponding screen point and a center of projection of the camera. 10.The system of claim 9 wherein an intersection of the ray with the screenplane yields the 3D coordinates of the corresponding bright spot cornerin the screen.